package com.project.purchase.Controller;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.project.purchase.Service.IGoods;
import com.project.purchase.Service.Iindent;
import com.project.purchase.entity.Goods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author VX5
 * @Title: QZP
 * @ProjectName purchase
 * @Description: TODO
 * @date ${DAT}4:38
 */
@Controller
@RequestMapping("home")
public class HomeController {

    @Autowired
    Iindent iindent;
    @Autowired
    IGoods iGoods;

    @GetMapping("/get")
    public String GetAllIn(HttpServletRequest request)throws Exception{
        List list2 = iGoods.GetAll();
        List list1 = iindent.GetAllIn();
        request.setAttribute("msg1",list1);
        request.setAttribute("msg2",list2);
        return "home";
    }
}
